package  
{
	import org.flixel.*;
	/**
	 * ...
	 * @author joon
	 */
	public class SplashParticle extends FlxParticle
	{
		[Embed(source = "../assets/SplashParticlePurple.png")] public const imgSplashParticlePurple:Class;
		[Embed(source = "../assets/SplashParticleYellow.png")] public const imgSplashParticleYellow:Class;
		
		public var owner:FlxSprite;
		public var originalOwner:FlxSprite;
		
        public function SplashParticle(pOwner:FlxSprite,isYellow:Boolean)
        {
            super();
           
			originalOwner = owner = pOwner;
			
			if (!isYellow)
			{	
				loadGraphic(imgSplashParticlePurple);
			}
			else
			{
				loadGraphic(imgSplashParticleYellow);
			}
           
            exists = false;
        }
       
        override public function onEmit():void
        {
			owner = originalOwner;
            elasticity = 0;
            drag = new FlxPoint(4, 0);
			mass = 0.1;
        }
		
	}

}